home *** CD-ROM | disk | FTP | other *** search
/ BBS Toolkit / BBS Toolkit.iso / rbbs_pc / pswd174.zip / RSB1PSWD.MRG < prev    next >
Text File  |  1992-05-16  |  9KB  |  160 lines

  1. * ------------[ BLED merge (c) Ken Goosens ]-------------
  2. * Merge this against RBBSSUB1.BAS to produce RBBSSUB1.NEW
  3. * RBBSSUB1.BAS:  Date 3-5-1992  Size 58998 bytes
  4. * ------------[ Created 05-16-1992 22:49:53 ]------------
  5. * REPLACING old line(s) by new
  6. ' $linesize:132
  7. ' $title: 'RBBS-SUB1.BAS 17.4, Copyright 1986-92 by D. Thomas Mack'
  8. '  Copyright 1990 by D. Thomas Mack, all rights reserved.
  9. '  Name ...............: RBBSSUB1.BAS
  10. '  First Released .....: April 12, 1992
  11. '  Subsequent Releases.: 
  12. '  Copyright ..........: 1986-1992
  13. '  Purpose.............:
  14. '     Subprorams that require error trapping are incorporated
  15. '     within RBBSSUB1.BAS as separately callable subroutines
  16. '     in order to free up as much code as possible within
  17. '     the 64WasK code segment used by RBBS-PC.BAS.
  18. '  Parameters..........: Most parameters are passed via a COMMON statement.
  19. '
  20. ' Subroutine  Line               Function of Subroutine
  21. '   Name     Number
  22. '  ChangeDir   20101   Change subdirectory
  23. '  CheckInt    58360   Check input is valid integer
  24. '  CommPut     59275   Write string to communications port
  25. * ------[ first line different ]------
  26. '  ExpiredPswd 63801   Force change of password                      ' PSWD174
  27. '  FindFile    59790   Determine whether a file exists without opening it
  28. '  FindFree    51098   Find amount of space on the upload disk drive
  29. '  FindItX     20219   Find if a file exists on a device
  30. '  FindUser    12598   Find a user in the USERS file
  31. '  FlushCom    20308   Read all characters in the communications port
  32. '  GetCom       1418   Read a character from the communications port
  33. '  GetPassword 58280   Read RBBS-PC's "PASSWORD" file
  34. '  GETWRK      58330   Read record from file number 2
  35. '  KillWork    58258   Delete a RBBS-PC "WORK" file
  36. '  NetBIOS     20898   Lock/Unlock NetBIOS semaphore files
  37. '  OpenCom       200   Open communications port (number 3)
  38. '  OpenFMS     58188   Open the upload management system directory
  39. '  OpenOutW    28218   Open RBBS-PC's "WORK" file (number 2) for output
  40. '  OpenRSeq     1479   Open a sequential file (number 2) for random I/O
  41. '  OpenUser     9398   Open the USER file (number 5)
  42. '  OpenWork    57978   Open RBBS-PC's work file (number 2)
  43. '  OpenWorkA   58340   Open RBBS-PC's "WORK" file (number 2) for append
  44. '  Printit     13673   Print line on the local PC printer
  45. '  PrintWork   58320   Print string to file #2 w/o CR/LF
  46. '  PrintWorkA  58350   Print string to file #2 with CR/LF
  47. '  PutCom      59650   Write to the communications port
  48. '  PutWork     59660   Write to work file randomly
  49. '  RBBSPlay    59680   Plays a musical string
  50. '  ReadAny     58310   Read file number 2 into ZOutTxt$
  51. '  ReadDef       112   Read configuration file
  52. '  ReadDir     58290   Read entire lines
  53. '  ReadParmsX  58300   Read certain number of parameters from specified file ' KG112101
  54. '  Talk        59700   RBBS-PC Voice synthesizer support for sight impaired
  55. '  SetCall       108   Find where next callers record is
  56. '  UpdateC     43048   Update the caller's file with elasped session time
  57. '  UpdtCalr    13661   Update to the caller's file
  58. '
  59. '  $INCLUDE: 'RBBS-VAR.BAS'
  60. '
  61. * REPLACING old line(s) by new
  62. 58280 ' $SUBTITLE: 'GetPassword - sub to read the "passwords" file'
  63. ' $PAGE
  64. '
  65. '  NAME    -- GetPassword
  66. '
  67. '                          PARAMETER             MEANING
  68. '  INPUTS  -- FILE # 2 OPENED
  69. '
  70. '  OUTPUTS -- ZTempPassword$
  71. '             ZTempSecLevel
  72. '             ZTempTimeAllowed
  73. '             ZTempRegPeriod
  74. '             ZTempMaxPerDay
  75. '
  76. '  PURPOSE -- To read the RBBS-PC "PASSWORDS" file
  77. '
  78.       SUB GetPassword STATIC
  79.       ON ERROR GOTO 65000
  80.       ZErrCode = 0
  81.       INPUT #2,ZTempPassword$,    ZTempSecLevel, _
  82.                ZTempTimeAllowed,  ZTempMaxPerDay, _
  83.                ZTempRegPeriod,    ZTempExpiredSec, _                 ' DA021501
  84.                ZStartTime,        ZEndTime, _                        ' DA021501
  85.                ZByteMethod,       ZRatioRestrict#, _                 ' DA021501
  86.                ZInitialCredit#,   ZTempTimeLock, _                   ' DA021501
  87. * ------[ first line different ]------
  88.                ZTempMaxBank,      ZPswdChngReqTime                   ' PSWD174
  89. * REPLACING old line(s) by new
  90. 59791 IF FExists THEN _
  91.          IOErrorCount = 0 : _
  92.          CALL RBBSFind (FilName$,WasZ,WasY,WasM,WasD) : _
  93.          FExists = (WasZ = 0)
  94.       END SUB
  95. * ------[ first line different ]------
  96. '
  97. * INSERTING new line(s)
  98. 63801 '$SUBTITLE: 'ExpiredPswd -- Subroutine to force change of password' ' PSWD174
  99. ' $PAGE
  100. '
  101. ' NAME:    -- ExpiredPswd
  102. '
  103. ' PURPOSE: -- Force a user to change his/her password every 30 times
  104. '             logged on to the system.
  105. '
  106. ' WRITTEN BY: Richie Molinelli on 03-14-92
  107. '
  108.       SUB ExpiredPswd STATIC                                         ' PSWD174
  109.       IF ZPswdChngReqTime = 0 THEN _                                 ' PSWD174
  110.          EXIT SUB                                                    ' PSWD174
  111.       IF ZTimesLoggedOn MOD ZPswdChngReqTime <> 0 THEN _             ' PSWD174
  112.          EXIT SUB                                                    ' PSWD174
  113. 63802 CALL SkipLine (1)                                              ' PSWD174
  114.       CALL QuickTPut1 ("Your password has expired...you must change your password.") ' PSWD174
  115.       Prompt$ = "Enter a New Password"                               ' PSWD174
  116.       CALL NewPassword (Prompt$,ZTrue)                               ' PSWD174
  117.       CALL AllCaps (ZOldPassword$)                                   ' PSWD174
  118.       IF ZWasZ$ = ZOldPassword$ THEN _                               ' PSWD174
  119.          CALL SkipLine (1) : _                                       ' PSWD174
  120.          CALL QuickTPut1 ("You CANNOT reuse your OLD PASSWORD!") : _ ' PSWD174
  121.          CALL SkipLine (1) : _                                       ' PSWD174
  122.          GOTO 63802                                                  ' PSWD174
  123.       ZOutTxt$ = "Re-enter your New Password"                        ' PSWD174
  124.       ZHidden = ZTrue                                                ' PSWD174
  125.       ZSubParm = 1                                                   ' PSWD174
  126.       CALL TGet                                                      ' PSWD174
  127.       CALL AllCaps (ZUserIn$)                                        ' PSWD174
  128.       IF ZWasZ$ <> ZUserIn$ THEN _                                   ' PSWD174
  129.          ZOutTxt$ = "Passwords do not match" : _                     ' PSWD174
  130.          ZSubParm = 1 : _                                            ' PSWD174
  131.          CALL TPut : _                                               ' PSWD174
  132.          GOTO 63802                                                  ' PSWD174
  133.       CALL UpdtCalr ("Expired Password! " + Time$,2)                 ' PSWD174
  134.       ZSubParm = 6                                                   ' PSWD174
  135.       CALL FileLock                                                  ' PSWD174
  136.       CALL OpenUser (HighestUserRecord)                              ' PSWD174
  137.       GET 5,ZUserFileIndex                                           ' PSWD174
  138.       CALL AllCaps (ZUserIn$)                                        ' PSWD174
  139.       LSET ZPswd$ = ZUserIn$                                         ' PSWD174
  140.       IF ZUserFileIndex > 0 AND ZUserFileIndex < 32768 THEN _        ' PSWD174
  141.          PUT 5,ZUserFileIndex                                        ' PSWD174
  142.       ZSubParm = 8                                                   ' PSWD174
  143.       CALL FileLock                                                  ' PSWD174
  144.       ZOutTxt$ = "Password Changed."                                 ' PSWD174
  145.       ZStopInterrupts = ZTrue                                        ' PSWD174
  146.       ZSubParm = 1                                                   ' PSWD174
  147.       CALL TPut                                                      ' PSWD174
  148.       CALL SkipLine (1)                                              ' PSWD174
  149.       CALL UpdtCalr ("New Password " + ZUserIn$(1),2)                ' PSWD174
  150.       CALL DelayTime (2)                                             ' PSWD174
  151.       END SUB                                                        ' PSWD174
  152. '                                                                    ' PSWD174
  153. '  $SUBTITLE: 'Error Handling for separately compiled subroutines'
  154. '  $PAGE
  155. '
  156. '
  157. ' Error handling for the separately compiled subroutines of RBBS-PC
  158. '
  159. '
  160.